package org.example.project.bookstore.config;

import jakarta.annotation.Resource;
import org.example.project.bookstore.interpector.IsLoginInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Auther:Liu
 * @Testname:SpringMVCConfig
 * @Date:2025/8/19 18:07
 */
public class SpringMVCConfig implements WebMvcConfigurer {
    @Resource
    private IsLoginInterceptor isLoginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(isLoginInterceptor).addPathPatterns("/ShoppingCart/**");
    }
}
